﻿/* ===== خط المصحف العثماني ===== */
@font-face {
    font-family: "UthmanicHafs";
    src: url("../fonts/UthmanicHafs_V22.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== صفحات القرآن الكريم PDF ===== */
.page-hero{background-color:#131533;background-image:url("../images/header.webp");background-position:center;background-size:cover;color:#fff;padding:75px 0}
.pdf-layout{width:100%;align-items:flex-start}
.pdf-index-content,.pdf-reader-page{flex:1;width:100%;min-width:0}
.quran-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;width:100%}
.quran-item,.quran-item:visited{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:18px;border:1px solid #e5e5ea;border-radius:18px;background:#fafafa;color:#131533;text-decoration:none;box-sizing:border-box;transition:.2s}
.quran-item:hover{transform:translateY(-3px);border-color:#db9a46;box-shadow:0 8px 22px rgba(19,21,51,.10)}
.quran-item img{width:100%;max-width:210px;aspect-ratio:3/4;object-fit:cover;border-radius:12px}
.quran-item h3{margin:0 0 14px;font-size:18px}
.quran-item span{margin-top:14px;color:#db9a46;font-size:14px;font-weight:bold}
.pdf-reader-page{padding:28px;border:1px solid #ededed;border-radius:22px;background:#fafafa;box-sizing:border-box}
.pdf-intro{margin:0 0 22px;color:#444;line-height:2}
.pdf-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-bottom:24px}
.pdf-button,.pdf-button:visited,.back-to-pdf,.back-to-pdf:visited{display:inline-block;padding:12px 24px;border-radius:24px;background:#131533;color:#fff;text-decoration:none;font-weight:bold}
.pdf-button.pdf-download{background:#db9a46}.pdf-button:hover,.back-to-pdf:hover{opacity:.88}
.pdf-viewer{display:block;width:100%;height:780px;border:1px solid #ddd;border-radius:14px;background:#fff}
.back-to-pdf{margin-top:22px}
@media(max-width:900px){.quran-list{grid-template-columns:repeat(2,minmax(0,1fr))}.pdf-viewer{height:650px}}
@media(max-width:520px){.page-hero{padding:55px 0}.quran-list{grid-template-columns:1fr}.pdf-reader-page{padding:18px 12px}.pdf-button{width:100%;box-sizing:border-box}.pdf-viewer{height:520px}}

.quran-text{
    font-family: "UthmanicHafs", serif;
    font-size: 46px;
    line-height: 2.15;
    text-align: justify;
    direction: rtl;
    color:#111;
    word-spacing: 1px;
    letter-spacing: 0;
    padding: 6px 8px;
    box-sizing: border-box;
}

.ayah{
    display:inline;
}

.ayah-number{
    font-family: inherit;
    color:#666;
    font-size:0.8em;
    margin:0 5px;
}





body {
      margin: 0;
           background-color: #ffffff;
    }

/* ====== الهوامش العامة ====== */
.page-wrapper {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 250px;
  position: relative;
  left: 40px; /* إزاحة الصفحة إلى اليمين */
}

    /* ====== الهيدر ====== */
    header {
      background-color: #131533;
  background-image: url("../images/header.webp");
 background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
      color: #ffffff;
      padding: 115px 0;
    }

    header h1 {
      margin: 0;
      text-align: center;
      font-size: 32px;
    }










/* الهيدر العام */
.main-header {
  background: transparent;   /* بدون لون ولا صورة */
  box-shadow: none;           /* اختياري */
background-color: #131533; /* اللون الأزرق للهيدر */
  color: #fff;
  padding: 15px 0;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* حاوية الهيدر */
.main-header .container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* اللوقو */
.logo img {
  max-height: 55px;   /* 👈 صغّر اللوقو من هنا */
  width: auto;
  display: block;
}






/* ===== القائمة الرئيسية ===== */
.main-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;      /* القائمة الرئيسية أفقية */
  gap: 20px;          /* المسافة بين الروابط */
}

/* عناصر القائمة */
.main-nav > ul > li {
  position: relative;  /* مهم للقائمة المنسدلة */
}

/* روابط القائمة الرئيسية */
.main-nav > ul > li > a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

/* تأثير hover على القائمة الرئيسية */
.main-nav > ul > li > a:hover {
  background-color: #fff;
  color: #004080;
  border-radius: 4px;
}

/* ===== القائمة المنسدلة ===== */
.dropdown-menu {
  display: none;          /* مخفية افتراضيًا */
  position: absolute;     /* خارج flex */
  top: 100%;              /* أسفل العنصر الرئيسي */
  right: 0;               /* RTL */
  background: #fff;
  border: 1px solid #ddd;
  min-width: 180px;
  z-index: 1000;
  flex-direction: column;
}


.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(255, 255, 255, 0.50);
  border: 1px solid #ddd;
  min-width: 180px;
  z-index: 1000;
  flex-direction: column;
}


/* روابط القائمة المنسدلة */
.dropdown-menu li a {
  display: block;
  padding: 10px 14px;
  white-space: nowrap;
  color: #000;
  text-decoration: none;
  transition: background-color 0.3s;
}

/* إظهار القائمة عند hover على العنصر الرئيسي */
.main-nav > ul > li.dropdown:hover .dropdown-menu {
  display: block;
}

/* تأثير hover على روابط القائمة المنسدلة */
.dropdown-menu li a:hover {
  background-color: #f2f2f2;
}












    /* ====== المحتوى ====== */
    main {
      display: flex;
  justify-content: space-between; /* يبعد المحتوى عن العمود */
  align-items: flex-start;         /* يثبتهم في الأعلى */

text-align: center;
      gap: 40px;
       margin: 30px auto;
max-width: 1200px;               /* لتقييد العرض */
  padding: 0 1px;
  box-sizing: border-box;
    }

    /* العمود الرئيسي (75%) */
    .content {
      width: 75%;
flex: 1;             /* يشغل كل المساحة الممكنة */
  max-width: 500px;    /* الحد الأقصى للمحتوى */
    }

    .content h2 {
      font-size: 24px;
      margin-bottom: 15px;
    }

    .content p {
      font-size: 16px;
      line-height: 2;
    }



p a {
  text-decoration: none;
}



/* ====== المستطيلات الثلاث داخل المحتوى ====== */
.quran-stats {
  display: flex;
  justify-content: center;   /* توسيط المستطيلات */
  gap: 10px;                 /* المسافة بين المستطيلات */
  margin: 30px 0;            /* مسافة فوق وتحت */
  flex-wrap: wrap;           /* يلتف تلقائيًا على الشاشات الصغيرة */
}

.stat-box {
  background-color: #F5F5F5;  /* نفس لون مستطيل تحميل القرآن الكريم */
  padding: 1px 2px;
  border-radius: 15px;
  text-align: center;
  min-width: 100px;           /* عرض أدنى لكل مستطيل */
  border: 2px solid #8183A3; /* ✔ الحد الملون */


}

.stat-box p {
  margin: 0;
  font-weight: bold;
  font-size: 14px;
  color: #131533;
}

.stat-box h3 {
  margin: 4px 0 0 0;
  font-size: 20px;
  color: #DB9A46;
}






.sidebar {
  width: 320px;
  min-width: 0;              /* هذا السطر مهم جدًا */
  border: 1px solid #EDEDED;
  padding: 16px;
  border-radius: 18px;
  background-color: #FFFFFF;
  box-sizing: border-box;
 flex-shrink: 0;
}







    /* ====== الفوتر ====== */
    footer {
      background-color: #131533;
      color: #ffffff;
      text-align: center;
      padding: 15px 0;
      font-size: 16px;
    }

    /* ====== تجاوب الشاشات الصغيرة ====== */
    @media (max-width: 900px) {
      .page-wrapper {
        margin-left: 20px;
        margin-right: 20px;
      }

      main {
        flex-direction: column;
      }

      .content,
      .sidebar {
        width: 100%;
max-width: 100%;
      }

      .sidebar {
        border-right: none;
        padding-right: 0;
      }
    }

















/* تنسيق العمود الجانبي النهائي */
.sidebar {
  border: 2px solid #EDEDED;       /* حدود المستطيل */
  padding:16px;
  border-radius: 40px;
  background-color: #fffff;
  
  display: flex;
  flex-direction: column;
  align-items: center;           /* لتوسيط العناصر أفقياً */
}

.sidebar-title {
  margin-bottom: 16px;
  font-weight: bold;
  text-align: center;
}

.sidebar img {
  width: 100%;       /* تجعل الصورة تتناسب مع عرض العمود الجانبي */
  max-width: 200px;  /* أقصى حجم للصورة لتبقى صغيرة */
  height: auto;      /* يحافظ على نسبة العرض والارتفاع */
  display: block;    /* لإزالة أي فراغ أسفل الصورة */
}




/* ===== شريط البحث (مصَحَّح) ===== */

.search-box {
  display: flex;
  width: 100%;
}

.search-box input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  font-family: 'Noto Kufi Arabic', sans-serif;
  border: none;
  border-radius: 0 20px 20px 0;
  background-color: #DB9A46;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
}

.search-box input::placeholder {
  color: #ffffff;
}

.search-box button {
  width: 44px;
  border: none;
  background-color: #DB9A46;
  border-radius: 20px 0 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-box button:hover {
  background-color: #b77a32;
}






.mushaf-section {
  text-align: center;
  margin-top: 20px; /* مسافة فوق */
}

.mushaf-section a {
  text-decoration: none; /* يلغي خط تحت النص */
  color: inherit;        /* يرث اللون الافتراضي */
}

.mushaf-img {
  width: 100%;
  max-width: 200px;      /* حجم الصورة */
  border-radius: 12px;   /* زوايا ناعمة */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2); /* ظل خفيف */
  transition: transform 0.3s;
}

.mushaf-img:hover {
  transform: scale(1.05); /* تكبير خفيف عند المرور */
}

.mushaf-caption {
  margin-top: 8px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}







.separator {
  height: 1px;
  background-color: #EDEDED; /* لون واضح */
  border: none;
  margin: 25px 0;
  width: 90%;
  display: block;
}





.download-quran {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 250px;
  margin: 20px auto;
  padding: 12px;
  background-color: #DB9A46;
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  border-radius: 20px;
  box-sizing: border-box;
}

.search-box input {
  font-family: 'Noto Kufi Arabic', sans-serif;
}



@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('../fonts/NotoKufiArabic.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Noto Kufi Arabic', sans-serif;
}


h1, h2, nav a {
  font-family: 'Noto Kufi Arabic', sans-serif; /* للعناوين والقائمة */
}






/* ====== شريط البحث النهائي ====== */
.sidebar .quran-search {
  width: 100%;
  display: flex;
  justify-content: center;   /* لتوسيط الشريط داخل العمود */
  margin: 20px 0;
}

.sidebar .search-inner {
  display: flex;
flex-direction: row;
  align-items: center;
  width: 90%;       /* الشريط لا يمتد حتى حافة العمود */
  max-width: 300px;
margin: 0 auto;  /* لتوسيط الشريط داخل العمود */
  gap: 0;
}

.sidebar .search-inner input {
  flex: 1;
  height: 40px;
  padding: 0 12px;
  font-size: 16px;
  font-family: 'Noto Kufi Arabic', sans-serif;
  border: 2px solid #DB9A46;
  border-left: none;
  border-radius: 0 20px 20px 0;
  color: #fff;
  background-color: #DB9A46;
  outline: none;
  box-sizing: border-box;
  min-width: 0;
}

.sidebar .search-inner button {
  width: 40px;
  height: 40px;
  border: 2px solid #DB9A46;
  border-right: none;
  border-radius: 20px 0 0 20px;
  background-color: #DB9A46;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-left: 4px; /* مسافة بسيطة عن حد العمود */
}

.sidebar .search-inner button svg {
  transform: none;
}

.sidebar .search-inner button:hover {
  background-color: #b77a32;
}





/* ====== قائمة أشهر القراء ====== */

.reciter {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;          /* مسافة ثابتة بين الصورة والاسم */
  width: 100%;        /* مهم جدًا */
  direction: rtl;     /* مهم */
  margin-bottom: 10px;
}

.reciter img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;     /* يمنع الصورة من الانكماش */
}

.reciter span {
  font-size: 14px;
  text-align: right;
  font-weight: bold;
}

.reciter {
  text-decoration: none;   /* إزالة الخط */
  color: inherit;          /* ياخذ نفس لون النص الطبيعي */
}

.reciter:visited {
  color: inherit;          /* يمنع تغيّر اللون بعد الضغط */
}

.reciter:hover {
  color: #DB9A46;   
}






/* ====== تنسيق قائمة المصاحف PDF ====== */

.page-content {
  display: flex;
  flex-direction: column; /* هذا هو المفتاح */
}

.page-header {
  margin-bottom: 30px;
}

.quran-list {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.quran-item {
  text-align: center;
  max-width: 200px;
}

.quran-item img {
  width: 100%;
  height: auto;
  display: block;
}

.quran-item a {
  display: inline-block;
  margin-top: 10px;
}



/* صورة المحتوى */
.content-img {
  width: 100%;       /* تتناسب مع عرض العنصر الحاوي */
  max-width: 600px;  /* الحد الأقصى للعرض */
  height: auto;      /* يحافظ على النسبة */
  display: block;
  margin: 0 auto 20px auto; /* توسيط الصورة ضمن المحتوى */

}

/* ====== انتقال السورة التالية والسورة السابقة ====== */
.surah-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding: 12px;
  border-top: 1px solid #ccc;
}

.surah-nav a {
  text-decoration: none;
  font-size: 16px;
  color: #0077cc;
}

.surah-nav a:hover {
    text-decoration: none;
}









/* ======تنسيق الفهرس ====== */


.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-top: 25px;
}

table.quran-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: center !important;
  background-color: white !important;
}

table.quran-table th {
  background-color: #dddddd !important;
  color: #333333 !important;
  padding: 14px 10px !important;
  border: 1px solid #cccccc !important;
}

table.quran-table td {
  padding: 13px 10px !important;
  border: 1px solid #dddddd !important;
  color: #333333 !important;
}

table.quran-table tbody tr:nth-child(odd) {
  background-color: #ffffff !important;
}

table.quran-table tbody tr:nth-child(even) {
  background-color: #eeeeee !important;
}


table.quran-table a {
  color: #0066cc !important;
  font-weight: normal !important;
  text-decoration: none !important;
}

table.quran-table a:hover {
  text-decoration: none !important;
}

table.quran-table caption {
  padding: 15px !important;
  font-size: 20px !important;
  font-weight: bold !important;
  background-color: #FFFFFF !important;
  color: #131533 !important;
}



/* ======تنسيق السور ====== */



.quran-text {
    font-size: 28px;
    line-height: 1;
    text-align: justify;
}

.ayah {
    display: inline;
}

.ayah-number {
    color: #1DB422;
    font-weight: normal;
    margin: 0 6px;
}






/* ===== التنسيق النهائي للنص القرآني ===== */

.quran-text {
    font-family: "UthmanicHafs", serif !important;
    font-size: 30px !important;
    line-height: 1.8 !important;
    direction: rtl;
    text-align: justify;
}

.quran-text .ayah {
    font-size: inherit !important;
    line-height: inherit !important;
    font-family: inherit !important;
    display: inline;
}

.quran-text .ayah-number {
    font-size: 1em !important;
    line-height: inherit !important;
}



/* ===== تقريب المحتوى من القائمة الجانبية ===== */

main {
    gap: 40px !important;
    justify-content: center !important;
}

.content {
    max-width: 950px !important;
}

.sidebar {
    margin-right: 0 !important;
}


/* ===== صورة البسملة ===== */

.bismillah {
    text-align: center;
    margin: 20px 0 25px;
}

.bismillah img {
    width: 550px;
    max-width: 90%;
    height: auto;
    display: inline-block;
}






/* ==================================================
   صفحة اتصل بنا
================================================== */

.contact-page {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    display: block !important;
}

.contact-box {
    width: 100%;
    background-color: #ffffff;
    border: 2px solid #EDEDED;
    border-radius: 25px;
    padding: 35px;
    box-sizing: border-box;
}


/* ===== العنوان ===== */

.contact-box h1 {
    text-align: center;
    color: #131533;
    font-size: 30px;
    margin-top: 0;
    margin-bottom: 15px;
}

.contact-intro {
    text-align: center;
    color: #555;
    line-height: 2;
    margin-bottom: 35px;
}


/* ===== العناوين الفرعية ===== */

.contact-box h2 {
    color: #131533;
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}


/* ===== البريد الإلكتروني ===== */

.contact-info {
    text-align: center;
}

.contact-info a {
    color: #DB9A46;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}


/* ==================================================
   أيقونات التواصل الاجتماعي
================================================== */

.social-contact {
    text-align: center;
    margin-top: 35px;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}


/* الرابط */

.social-icons a {
    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    transition: transform 0.25s ease;
}


/* صورة الأيقونة */

.social-icons img {
    width: 45px;
    height: 45px;

    object-fit: contain;
    display: block;
}


/* تكبير بسيط عند مرور الماوس */

.social-icons a:hover {
    transform: scale(1.15);
}


/* ==================================================
   نموذج التواصل
================================================== */

.contact-form-section {
    margin-top: 40px;
}

.contact-form-section h2 {
    text-align: center;
}

.contact-form {
    max-width: 650px;
    margin: 20px auto 0;
    text-align: right;
}


/* ===== الحقول ===== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #131533;

    font-weight: bold;
}


/* input + textarea */

.form-group input,
.form-group textarea {

    width: 100%;

    padding: 12px 15px;

    border: 1px solid #cccccc;
    border-radius: 12px;

    background-color: #ffffff;

    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 15px;

    box-sizing: border-box;

    outline: none;

    transition: border-color 0.2s ease;
}


/* عند الضغط على الحقل */

.form-group input:focus,
.form-group textarea:focus {

    border-color: #DB9A46;

}


/* مربع الرسالة */

.form-group textarea {

    resize: vertical;

    min-height: 150px;

}


/* ==================================================
   زر الإرسال
================================================== */

.contact-form button {

    display: block;

    margin: 25px auto 0;

    border: none;

    background-color: #DB9A46;
    color: #ffffff;

    padding: 12px 35px;

    border-radius: 25px;

    font-family: 'Noto Kufi Arabic', sans-serif;

    font-size: 16px;

    cursor: pointer;

    transition: background-color 0.25s ease;
}


.contact-form button:hover {

    background-color: #b77a32;

}


/* ==================================================
   الجوال
================================================== */

@media (max-width: 600px) {

    .contact-page {

        width: 94%;

        margin: 25px auto;

    }


    .contact-box {

        padding: 20px;

        border-radius: 18px;

    }


    .contact-box h1 {

        font-size: 25px;

    }


    .social-icons {

        gap: 15px;

    }


    .social-icons a {

        width: 45px;
        height: 45px;

    }


    .social-icons img {

        width: 38px;
        height: 38px;

    }

}










/* ===== إصلاح عرض صفحة السورة على الكمبيوتر ===== */
@media (min-width: 901px) {

    .page-wrapper {
        max-width: 1500px !important;
        width: calc(100% - 40px) !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        box-sizing: border-box;
        position: static !important;
    }

    main {
        width: 100% !important;
        max-width: 1350px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: flex-start !important;
        gap: 30px !important;
        margin: 30px auto !important;
        padding: 0 !important;
    }

    .content {
        flex: 1 1 auto !important;
        width: auto !important;
        max-width: 720px !important;
        min-width: 0 !important;
position: relative;
 left: 30px; /* إزاحة المحتوى إلى اليمين */
    }

    .sidebar {
        width: 300px !important;
        flex: 0 0 300px !important;
        margin: 0 !important;
    }

    .quran-text {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box;
    }
}

/* لفظ الجلالة وألفاظ الرب */
.lafz-jalalah {
    color: #F53527 !important;
}


/* ===== صفحة القرآن الكريم MP3 ===== */

.mp3-content {
  max-width: 760px;
}

.mp3-page {
  width: 100%;
}

.mp3-intro {
  margin: 0 auto 20px;
  color: #444;
}

.mp3-stats {
  margin-bottom: 35px;
}

.reciters-section {
  margin-top: 24px;
}

.reciters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.mp3-reciter-card {
  display: flex;
  min-width: 0;
  min-height: 225px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 10px;
  border: 1px solid #E7E7EC;
  border-radius: 16px;
  background: #FFFFFF;
  color: #131533;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.mp3-reciter-card:visited {
  color: #131533;
}

.mp3-reciter-card:hover {
  color: #131533;
  border-color: #428CFF;
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .06);
}

.reciter-icon {
  grid-area: icon;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F5;
  border: 1px solid #E2E2E8;
  font-size: 22px;
}

.reciter-name {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 0 2px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.55;
  text-align: center;
  direction: rtl;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}

.reciter-action {
  grid-area: action;
  margin-top: 2px;
  color: #777;
  font-size: 12px;
}

.mp3-reciter-card:hover .reciter-name,
.mp3-reciter-card:hover .reciter-action {
  color: #4484EB;
}

.mp3-info {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid #EDEDED;
}

@media (max-width: 700px) {
  .reciters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mp3-reciter-card {
    padding: 13px;
  }
}





.mp3-reciter-card,
.mp3-reciter-card:visited,
.mp3-reciter-card:hover,
.mp3-reciter-card:active,
.mp3-reciter-card .reciter-name {
  text-decoration: none !important;
}


/* صورة القارئ */
.reciter-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px;
}

/* إزالة الخط تحت اسم القارئ */
.mp3-reciter-card,
.mp3-reciter-card:visited,
.mp3-reciter-card:hover,
.mp3-reciter-card:active,
.mp3-reciter-card .reciter-name {
  text-decoration: none !important;
}




.reciter-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reciter-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.reciter-name {
  margin-left: 0;
  text-decoration: none !important;
}

.reciter-name {
  transform: none;
}

@media (max-width: 470px) {
    .reciters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
    }

    .mp3-reciter-card {
        min-width: 0 !important;
        padding: 8px 3px !important;
    }

    .reciter-photo {
        width: 75px !important;
        height: 75px !important;
    }

    .mp3-reciter-card .reciter-name {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}



.reciter-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}



/* ====== بطاقة مشغل السورة ====== */
.surah-audio-card {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 32px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .13);
  border-radius: 28px 28px 18px 18px;
  background: #fff;
box-shadow: none;
  box-sizing: border-box;
}

.surah-audio-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 20px 20px 0;
  text-align: center;
}

.surah-reciter-thumb {
  display: block;
  text-decoration: none;
}

.surah-reciter-image {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 5px 18px rgba(22, 34, 55, .16);
  object-fit: cover;
  object-position: center top;
}

.surah-audio-info {
  min-width: 0;
  padding-bottom: 0;
  text-align: center;
}

.surah-audio-kicker {
  margin: 0 0 5px;
  color: #666;
  font-size: 14px;
}

.surah-audio-card h2 {
  margin: 0 0 12px;
  color: #181b35;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.5;
}

.surah-description {
  max-width: 500px;
  margin: 0 auto 22px;
  color: #555;
  line-height: 1.9;
}

.surah-player-title {
  width: 100%;
  padding: 10px 18px;
  border-radius: 12px 12px 0 0;
  background: #1d2134;
  color: #e8e9ef;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
}

.surah-player-panel {
  padding: 10px 16px;

  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  background: #f2f2f2;
}

.surah-audio-player {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0;
}

.surah-card-actions {
  padding: 14px 18px 18px;
  text-align: center;
}

.download-mp3-btn {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 12px 24px;
  border-radius: 10px;
  background: #1f7a5c;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: bold;
  transition: background-color .2s ease, transform .2s ease;
}

.download-mp3-btn:hover {
  background: #17664b;
  transform: translateY(-1px);
}

.surah-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.surah-nav a,
.surah-nav span {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e3e3e8;
  border-radius: 9px;
  background: #fff;
  text-decoration: none;
  text-align: center;
}

.surah-nav .disabled {
  opacity: .45;
}

.other-surahs-section {
  margin-top: 34px;
}

.other-surahs-section h2 {
  margin-bottom: 20px;
}

.other-surahs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.other-surah-link {
  display: block;
  padding: 11px 12px;
  border: 1px solid #e4e4e4;
  border-radius: 9px;
  background: #fff;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 700px) {
  .surah-audio-card {
    border-radius: 20px 20px 16px 16px;
  }

  .surah-audio-main {
    gap: 14px;
    padding: 20px 16px 0;
  }

  .surah-reciter-image {
    width: 125px;
    height: 125px;
    border-radius: 50%;
  }

  .surah-audio-card h2 {
    font-size: 20px;
  }

  .surah-description {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  .surah-player-title {
    padding: 8px 10px;
  }

  .surah-player-panel {
    padding: 11px 12px;
  }

  .surah-nav {
    flex-direction: column;
  }

  .other-surahs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 470px) {
  .surah-audio-main {
    padding: 18px 14px 0;
  }

  .surah-reciter-thumb {
    width: auto;
  }

  .surah-reciter-image {
    width: 115px;
    height: 115px;
    border-radius: 50%;
  }

  .surah-audio-info,
  .surah-description {
    text-align: center;
  }

  .surah-card-actions {
    padding: 16px 14px 18px;
  }

  .other-surahs-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== تعديل صورة القارئ: أكبر وبدون إطار أو ظل ===== */
.surah-reciter-image {
  width: 200px !important;
  height: 200px !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 50% !important;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 700px) {
  .surah-reciter-image { width: 165px !important; height: 165px !important; }
}

@media (max-width: 470px) {
  .surah-reciter-image { width: 150px !important; height: 150px !important; }
}

/* صفحات السور المكتوبة */
body:has(.quran-text) {
    background-color: #F7F7FC;
}

/* صفحات القرآن MP3 */
body:has(.mp3-page) {
    background-color: #F7F7FC;
}


/* ===== تقليل ارتفاع بطاقة مشغل MP3 ===== */

.surah-audio-main {
    gap: 5px !important;
    padding: 12px 20px 0 !important;
}

.surah-reciter-image {
    width: 170px !important;
    height: 170px !important;
    border: none !important;
    box-shadow: none !important;
}

.surah-audio-kicker {
    margin: 0 0 2px !important;
}

.surah-audio-card h2 {
    margin: 0 0 4px !important;
}

.surah-description {
    margin: 0 auto 8px !important;
    line-height: 1.5 !important;
}

.surah-player-title {
    padding: 6px 12px !important;
}

.surah-player-panel {
    padding: 6px 14px !important;
}

.surah-audio-player {
    height: 54px !important;
}

.surah-card-actions {
    padding: 10px 16px 12px !important;
}

.download-mp3-btn {
    margin-bottom: 8px !important;
    padding: 8px 20px !important;
}

.surah-nav {
    margin-top: 5px !important;
}

.sidebar-links a,
.sidebar-links a:hover,
.sidebar-links a:focus,
.sidebar-links a:active,
.sidebar-links a:visited {
    text-decoration: none !important;
}



.surah-audio-card {
    background-color: #FAFAFA !important;
}




.surah-nav a,
.surah-nav span {
    background-color: #FAFAFA !important;
}

.sidebar {
    background-color: #FAFAFA !important;
}


/* ===== لون نص سور اخرى بصوت القارئ ===== */

.other-surah-link,
.other-surah-link:visited,
.other-surah-link:hover,
.other-surah-link:active {
    color: #0077cc !important;
    text-decoration: none !important;
}

/* ===== سورة واحدة بصوت جميع القراء: نفس تصميم روابط السور ===== */
.same-surah-reciters-section {
    margin-top: 40px;
}

.same-surah-reciter-link {
    background-color: #FAFAFA;
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    font-weight: bold;
    text-align: center;
}

.same-surah-reciter-image {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin: 0 auto;
}

.same-surah-reciter-link span {
    display: block;
    line-height: 1.7;
}

@media (max-width: 470px) {
    .same-surah-reciter-link {
        min-height: 170px;
    }

    .same-surah-reciter-image {
        width: 105px;
        height: 105px;
    }
}

/* ===== إصلاح شامل لصفحات MP3 على الجوال ===== */
@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 14px !important;
        left: 0 !important;
        position: static !important;
        box-sizing: border-box !important;
    }

    .main-header .container {
        width: 100% !important;
        padding: 0 12px;
        flex-direction: column;
        gap: 12px;
        box-sizing: border-box;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav > ul {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .main-nav > ul > li > a {
        padding: 8px 9px;
        font-size: 14px;
    }

    main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 20px auto !important;
        padding: 0 !important;
        flex-direction: column !important;
        gap: 24px !important;
        box-sizing: border-box;
    }

    .content,
    .mp3-content,
    .mp3-page,
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .sidebar {
        padding: 14px !important;
    }

    .surah-audio-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 14px !important;
        box-sizing: border-box !important;
    }

    .surah-audio-player {
        width: 100% !important;
        max-width: 100% !important;
    }

    .other-surahs-grid {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        box-sizing: border-box;
    }
}

@media (max-width: 470px) {
    .page-wrapper {
        padding: 0 10px !important;
    }

    .page-header {
        padding: 65px 0;
    }

    .page-header h1 {
        font-size: 24px;
        line-height: 1.6;
    }

    .other-surahs-grid {
        grid-template-columns: 1fr !important;
    }
}

/* أولوية تخطيط بطاقات PDF بعد التنسيقات القديمة */
.pdf-index-content .quran-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.pdf-index-content .quran-item {
    max-width: none;
}

@media (max-width: 900px) {
    .pdf-index-content .quran-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .pdf-index-content .quran-list {
        grid-template-columns: 1fr;
    }
}


/* ===== توحيد ارتفاع وترتيب بطاقات: نفس السورة بصوت قراء آخرين ===== */
.same-surah-reciters-section .same-surah-reciter-link {
    height: 205px !important;
    min-height: 205px !important;
    padding: 14px 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

.same-surah-reciters-section .same-surah-reciter-image {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    flex: 0 0 120px !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
}

.same-surah-reciters-section .same-surah-reciter-link span {
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1.5 !important;
    text-align: center;
    box-sizing: border-box;
}

@media (max-width: 470px) {
    .same-surah-reciters-section .same-surah-reciter-link {
        height: 190px !important;
        min-height: 190px !important;
    }

    .same-surah-reciters-section .same-surah-reciter-image {
        width: 105px !important;
        height: 105px !important;
        min-width: 105px !important;
        min-height: 105px !important;
        flex-basis: 105px !important;
    }
}


/* ===== سور أخرى بصوت الشيخ: 3 أعمدة على الجوال ===== */
@media (max-width: 900px) {
    .other-surahs-grid {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .other-surah-link {
        min-width: 0 !important;
        padding: 9px 3px !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
        overflow-wrap: anywhere;
        box-sizing: border-box !important;
    }
}

@media (max-width: 470px) {
    .other-surahs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px !important;
    }

    .other-surah-link {
        padding: 8px 2px !important;
        font-size: 11px !important;
        line-height: 1.4 !important;
    }
}


/* ===== قائمة الجوال الرئيسية Hamburger Menu ===== */
.mobile-menu-toggle {
    display: none !important;
    width: 44px;
    height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}
.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px auto;
    border-radius: 3px;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 900px) {
    .main-header .container {
        position: relative;
        width: 94%;
    }
    .mobile-menu-toggle {
        display: block !important;
        position: absolute;
        left: 0;
        top: 50%;
        z-index: 1202;
        transform: translateY(-50%);
    }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 15px);
        left: 0;
        right: 0;
        z-index: 1200;
        padding: 8px;
        background: #131533;
        box-shadow: 0 8px 20px rgba(0,0,0,.18);
    }
    .main-nav.is-open { display: block; }
    .main-nav > ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100%;
    }
    .main-nav > ul > li { width: 100%; }
    .main-nav > ul > li > a {
        width: 100%;
        padding: 12px 14px;
        box-sizing: border-box;
        text-align: right;
    }
    .main-nav .dropdown-menu {
        display: none !important;
        position: static !important;
        width: 100%;
        min-width: 0;
        border: 0;
        background: rgba(255,255,255,.08);
        box-sizing: border-box;
    }
    .main-nav .dropdown:hover .dropdown-menu { display: none !important; }
    .main-nav .dropdown.mobile-open > .dropdown-menu { display: block !important; }
    .main-nav .dropdown-menu li a {
        color: #fff;
        padding: 10px 24px 10px 12px;
        text-align: right;
    }
    .main-nav .dropdown-menu li a:hover { background: rgba(255,255,255,.10); }
    .mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}


/* ==================================================
   Hamburger Menu عام لجميع صفحات الموقع
   ================================================== */
.mobile-menu-toggle {
    display: none !important;
}

@media (max-width: 900px) {
    .main-header,
    header:has(.main-nav) {
        position: relative;
        z-index: 5000;
    }

    .main-header .container,
    header:has(.main-nav) > .container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex !important;
        width: 46px !important;
        height: 42px !important;
        padding: 8px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: transparent !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-around !important;
        cursor: pointer !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 5003 !important;
        flex: 0 0 46px !important;
    }

    .mobile-menu-toggle span {
        display: block !important;
        width: 29px !important;
        height: 3px !important;
        margin: 0 !important;
        border-radius: 3px !important;
        background: #ffffff !important;
        transition: transform .2s ease, opacity .2s ease !important;
    }

    .mobile-menu-toggle.is-open span:nth-child(1) {
        transform: translateY(9px) rotate(45deg) !important;
    }
    .mobile-menu-toggle.is-open span:nth-child(2) {
        opacity: 0 !important;
    }
    .mobile-menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg) !important;
    }

    /* إخفاء عناوين الهيدر في الجوال حتى الضغط على ☰ */
    .main-nav {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 5002 !important;
        background: #131533 !important;
        box-sizing: border-box !important;
        box-shadow: 0 10px 22px rgba(0,0,0,.20) !important;
    }

    .main-nav.mobile-menu-open,
    .main-nav.is-open {
        display: block !important;
    }

    .main-nav > ul {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0 !important;
        margin: 0 !important;
        padding: 7px 0 !important;
        list-style: none !important;
        background: inherit !important;
    }

    .main-nav > ul > li {
        width: 100% !important;
        margin: 0 !important;
        position: relative !important;
        border-bottom: 1px solid rgba(255,255,255,.10) !important;
    }

    .main-nav > ul > li > a {
        display: block !important;
        width: 100% !important;
        padding: 13px 18px !important;
        box-sizing: border-box !important;
        text-align: right !important;
        color: #ffffff !important;
        background: transparent !important;
        text-decoration: none !important;
    }

    /* منع hover المكتبي من فتح PDF على الجوال */
    .main-nav > ul > li.dropdown:hover > .dropdown-menu {
        display: none !important;
    }

    .main-nav .dropdown-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: rgba(255,255,255,.08) !important;
        box-shadow: none !important;
    }

    .main-nav .dropdown.mobile-dropdown-open > .dropdown-menu,
    .main-nav .dropdown.mobile-open > .dropdown-menu {
        display: block !important;
    }

    .main-nav .dropdown-menu li a {
        display: block !important;
        padding: 11px 30px 11px 18px !important;
        color: #ffffff !important;
        background: transparent !important;
        text-align: right !important;
        white-space: normal !important;
        text-decoration: none !important;
    }

    html.dark-mode .main-nav {
        background: #171b24 !important;
    }
}

@media (min-width: 901px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    .main-nav {
        display: block;
    }
}


/* الجوال: اللوقو أقصى اليمين و Hamburger أقصى اليسار */
@media (max-width: 900px) {
    .main-header .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 12px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0 !important;
        position: relative !important;
        box-sizing: border-box !important;
    }
    .main-header .logo { margin: 0 !important; padding: 0 !important; flex: 0 0 auto !important; }
    .main-header .logo img { display:block !important; width:auto !important; max-height:55px !important; margin:0 !important; }
    .main-header .mobile-menu-toggle {
        display:flex !important; position:absolute !important;
        left:12px !important; right:auto !important; top:50% !important;
        transform:translateY(-50%) !important; margin:0 !important; z-index:5003 !important;
    }
}


/* ===== quran-pdf: بطاقات المصاحف عمودان على الجوال ===== */
@media (max-width: 520px) {
    .pdf-index-content .quran-list,
    .quran-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .pdf-index-content .quran-item,
    .quran-item {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        padding: 10px 6px !important;
        box-sizing: border-box !important;
    }

    .pdf-index-content .quran-item img,
    .quran-item img {
        width: 100% !important;
        max-width: 135px !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    .pdf-index-content .quran-item h3,
    .quran-item h3 {
        font-size: 14px !important;
        line-height: 1.6 !important;
        margin-bottom: 8px !important;
    }

    .pdf-index-content .quran-item span,
    .quran-item span {
        font-size: 12px !important;
    }
}
